From bd0e51234660ccc08bcd83e0437e62ad9c91563a Mon Sep 17 00:00:00 2001 From: Jeffrey Seyfried Date: Fri, 4 Mar 2016 18:18:06 +0000 Subject: [PATCH] Ensure future compatibility with fixed module search paths (see rust PR #32006) --- src/bin/cargo.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/bin/cargo.rs b/src/bin/cargo.rs index 4ffa5ea8a..0e0071323 100644 --- a/src/bin/cargo.rs +++ b/src/bin/cargo.rs @@ -95,12 +95,10 @@ macro_rules! each_subcommand{ } } -mod subcommands { - macro_rules! declare_mod { - ($name:ident) => ( pub mod $name; ) - } - each_subcommand!(declare_mod); +macro_rules! declare_mod { + ($name:ident) => ( pub mod $name; ) } +each_subcommand!(declare_mod); /** The top-level `cargo` command handles configuration and project location @@ -162,8 +160,8 @@ fn execute(flags: Flags, config: &Config) -> CliResult> { macro_rules! cmd{ ($name:ident) => (if args[1] == stringify!($name).replace("_", "-") { config.shell().set_verbose(true); - let r = cargo::call_main_without_stdin(subcommands::$name::execute, config, - subcommands::$name::USAGE, + let r = cargo::call_main_without_stdin($name::execute, config, + $name::USAGE, &args, false); cargo::process_executed(r, &mut config.shell()); -- 2.30.2